/**
 * copyright (c) by handpay 2013
 */
package com.handpay.zztong.hp.bean;

import java.io.Serializable;

/**
 * 交易账单 java bean
 *
 * @author：Klaus Liu E-mail: lpluck08@gmail.com
 * @date：2013-3-20 下午02:40:23
 */
public class Bill implements Serializable {
    private static final long serialVersionUID = 8028558866698759606L;
    public static final int STATUS_SUCCESS = 1; // 交易成功
    public static final int STATUS_FAILED = 0; //交易失败
    public static final int STATUS_PROCESSING = 2; //交易处理中
    public static final int STATUS_NOT_PAY = 3;//未支付
    public static final int STATUS_CLOSED = 4;//已关闭
    public static final int STATES_REVOKE_NONE = 0;//未知
    public static final int STATES_ROVOKE_SUCCESS = 1;//已经撤销
    public static final int STATES_ROVOKE_ING = 2;//撤销中
    public static final int STATES_ROVOKE_FAIL = 3;//撤销失败

    public static final int TRAD_TYPE_NO = 0;//未知
    public static final int TRAD_TYPE_POSPAY = 1;//刷卡支付
    public static final int TRAD_TYPE_ALIPAY = 2;//支付宝支付
    public static final int TRAD_TYPE_WEIPAY = 3;//微信支付
    public static final int TRAD_TYPE_WEIPAY_SCAN = 4;//微信正扫支付
    public static final int TRAD_TYPE_ALIPAY_SCAN = 5;//支付宝正扫支付
    public static final int TRAD_SUPER_UNIPAY = 6;//超级转账

    //全渠道2.0
//    public static final int     STATUS_SETTLED   	= 3; // 做全渠道时加的状态，流水查询的时候是已结算状态

    /**
     * 交易时间
     */
    private String transTime;
    /**
     * 交易状态
     */
    private int status;

    /**
     * 交易状态描述
     */
    private String transStatus;

    /**
     * 交易流水号
     */
    private String transSN;

    /**
     * 转入卡号
     */
    private String cardNoIn;

    /**
     * 转出卡号
     */
    private String cardNoOut;

    /**
     * 转账金额
     */
    private double amount;

    /**
     * 手续费用
     */
    private double fee;

    /**
     * 实付金额
     */
    private double total;

    /**
     * 交易类型
     */
    private String type;

    /**
     * 签购单图片地址
     */
    private String imageUrl;
    /**
     * 签购单原单详情地址
     */
    private String detailUrl;
    /**
     * 商店名称
     */
    private String shopName;
    /**
     * 商户编号
     */
    private String merchantCode;
    /**
     * 发卡行号
     */
    private String issId;
    /**
     * 收单行号
     */
    private String specialNumber;
    /**
     * 卡组织
     */
    private String cardOrg;
    /**
     * 终端号
     */
    private String terminalNo;
    /**
     * 应用名称
     */
    private APPCODE appcode;
    /**
     * 交易介质类型
     */
    private String tranMediaType;
    /**
     * 消费卡拍照开关是否打开状态
     */
    private int isOpen;
    /**
     * 消费卡图片地址
     */
    private String cardImageUrl;
    /**
     * 转出卡完整卡号
     */
    private String cardNoOutFull;
    /**
     * 申诉状态
     */
    private String appealStatus;
    /**
     * 是否可以申诉
     */
    private int showAppealBtn;
    /**
     * 交易方式
     */
    private int tradeType;
    /**
     * 订单号支付宝和微信
     */
    private String orderNo;

    public String getOrderNo() {
        return orderNo;
    }

    /**
     * 交易卡号
     */
    private String transAccount;

    /**
     * 该订单是否可以撤销
     */
    private int isRevoke;
    /**
     * 撤销状态
     */
    private int rovokeState;

    /***
     * 1:快速转账；
     * 2:银联转账；
     */
    private String transChannel;
    private int showSignStatus;


    /**
     * 1,有签购单图片；
     * 2,无签购单图片；
     * 3,noimage不需要补签的交易；
     */
    public static final int SHOW_SIGN_STATUS_EXIST_BILL = 1;//有签购单图片
    public static final int SHOW_SIGN_STATUS_NO_BILL = 2;   //无签购单图片；
    public static final int SHOW_SIGN_STATUS_NO_IMAGE = 3;  //noimage不需要补签的交易；

    public String getTransChannel() {
        return transChannel;
    }

    public void setTransChannel(String transChannel) {
        this.transChannel = transChannel;
    }

    public String getAppealStatus() {
        return appealStatus;
    }

    public void setAppealStatus(String appealStatus) {
        this.appealStatus = appealStatus;
    }

    public int getShowAppealBtn() {
        return showAppealBtn;
    }

    public void setShowAppealBtn(int showAppealBtn) {
        this.showAppealBtn = showAppealBtn;
    }

    public int getRovokeState() {
        return rovokeState;
    }

    public void setRovokeState(int rovokeState) {
        this.rovokeState = rovokeState;
    }

    public int getIsRevoke() {
        return isRevoke;
    }

    public void setIsRevoke(int isRevoke) {
        this.isRevoke = isRevoke;
    }

    public String getTransAccount() {
        return transAccount;
    }

    public void setTransAccount(String transAccount) {
        this.transAccount = transAccount;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public int getIsOpen() {
        return isOpen;
    }

    public void setIsOpen(int isOpen) {
        this.isOpen = isOpen;
    }

    public String getCardImageUrl() {
        return cardImageUrl;
    }

    public void setCardImageUrl(String cardImageUrl) {
        this.cardImageUrl = cardImageUrl;
    }

    public String getCardNoOutFull() {
        return cardNoOutFull;
    }

    public void setCardNoOutFull(String cardNoOutFull) {
        this.cardNoOutFull = cardNoOutFull;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getMerchantCode() {
        return merchantCode;
    }

    public void setMerchantCode(String merchantCode) {
        this.merchantCode = merchantCode;
    }

    public String getIssId() {
        return issId;
    }

    public void setIssId(String issId) {
        this.issId = issId;
    }

    public String getSpecialNumber() {
        return specialNumber;
    }

    public void setSpecialNumber(String specialNumber) {
        this.specialNumber = specialNumber;
    }

    public String getCardOrg() {
        return cardOrg;
    }

    public void setCardOrg(String cardOrg) {
        this.cardOrg = cardOrg;
    }

    public String getTerminalNo() {
        return terminalNo;
    }

    public void setTerminalNo(String terminalNo) {
        this.terminalNo = terminalNo;
    }

    public String getTranMediaType() {
        return tranMediaType;
    }

    public void setTranMediaType(String tranMediaType) {
        this.tranMediaType = tranMediaType;
    }

    public enum APPCODE {
        TRANS, SAME_TRANS, SUPER_TRANS, MARKET_TRANS
    }

    public String getTransTime() {
        return transTime;
    }

    public void setTransTime(String transTime) {
        this.transTime = transTime;
    }

    public String getTransStatus() {
        return transStatus;
    }

    public void setTransStatus(String transStatus) {
        this.transStatus = transStatus;
    }

    public String getTransSN() {
        return transSN;
    }

    public void setTransSN(String transSN) {
        this.transSN = transSN;
    }

    public String getCardNoIn() {
        return cardNoIn;
    }

    public void setCardNoIn(String cardNoIn) {
        this.cardNoIn = cardNoIn;
    }

    public String getCardNoOut() {
        return cardNoOut;
    }

    public void setCardNoOut(String cardNoOut) {
        this.cardNoOut = cardNoOut;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public double getFee() {
        return fee;
    }

    public void setFee(double fee) {
        this.fee = fee;
    }

    public double getTotal() {
        return total;
    }

    public void setTotal(double total) {
        this.total = total;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) { //
        this.status = status;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getDetailUrl() {
        return detailUrl;
    }

    public void setDetailUrl(String detailUrl) {
        this.detailUrl = detailUrl;
    }

    public APPCODE getAppcode() {
        return appcode;
    }

    public void setAppcode(String appcode) {
        if ("1".equals(appcode) || "1.0".equals(appcode)) {
            this.appcode = APPCODE.TRANS;
        } else if ("2".equals(appcode) || "2.0".equals(appcode)) {
            this.appcode = APPCODE.SAME_TRANS;
        } else if ("3".equals(appcode) || "3.0".equals(appcode)) {
            this.appcode = APPCODE.SUPER_TRANS;
        }
    }

    public void setAppcode(APPCODE appCode) {
        this.appcode = appCode;
    }

    public int getTradeType() {
        return tradeType;
    }

    public void setTradeType(int tradeType) {
        this.tradeType = tradeType;
    }

    public int getShowSignStatus() {
        return showSignStatus;
    }

    public void setShowSignStatus(int showSignStatus) {
        this.showSignStatus = showSignStatus;
    }

    @Override
    public String toString() {
        return "Bill{" +
                "transTime='" + transTime + '\'' +
                ", status=" + status +
                ", transStatus='" + transStatus + '\'' +
                ", transSN='" + transSN + '\'' +
                ", cardNoIn='" + cardNoIn + '\'' +
                ", cardNoOut='" + cardNoOut + '\'' +
                ", amount=" + amount +
                ", fee=" + fee +
                ", total=" + total +
                ", type='" + type + '\'' +
                ", imageUrl='" + imageUrl + '\'' +
                ", detailUrl='" + detailUrl + '\'' +
                ", shopName='" + shopName + '\'' +
                ", merchantCode='" + merchantCode + '\'' +
                ", issId='" + issId + '\'' +
                ", specialNumber='" + specialNumber + '\'' +
                ", cardOrg='" + cardOrg + '\'' +
                ", terminalNo='" + terminalNo + '\'' +
                ", appcode=" + appcode +
                ", tranMediaType='" + tranMediaType + '\'' +
                ", isOpen=" + isOpen +
                ", cardImageUrl='" + cardImageUrl + '\'' +
                ", cardNoOutFull='" + cardNoOutFull + '\'' +
                ", appealStatus='" + appealStatus + '\'' +
                ", showAppealBtn=" + showAppealBtn +
                ", tradeType=" + tradeType +
                ", orderNo='" + orderNo + '\'' +
                ", transAccount='" + transAccount + '\'' +
                ", isRevoke=" + isRevoke +
                ", rovokeState=" + rovokeState +
                ", transChannel='" + transChannel + '\'' +
                ", showSignStatus=" + showSignStatus +
                '}';
    }
}
